<?php

use App\Api\Controllers\ShopController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Api\Controllers\ApiController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::get('/transfer', [ApiController::class, 'transfer']);

Route::get('/shop/product/list', [ShopController::class, 'getProductList']);
Route::get('/shop/product/list/v2', [ShopController::class, 'getProductListV2']);
Route::get('/shop/product/detail', [ShopController::class, 'getProductDetail']);
Route::get('/shop/dict/pcd', [ShopController::class, 'getPcdDict']);
Route::get('/shop/address', [ShopController::class, 'getAddress']);
Route::post('/shop/address/save', [ShopController::class, 'editPatientAddress']);
Route::post('/shop/address/delete', [ShopController::class, 'deletePatientAddress']);
Route::post('/shop/order/qrcode', [ShopController::class, 'qrcode']);
Route::post('/shop/order/confirm', [ShopController::class, 'confirmOrder']);
Route::post('/shop/order/create', [ShopController::class, 'createOrder']);
Route::post('/shop/order/jssdk', [ShopController::class, 'jssdk']);
Route::post('/shop/order/pay', [ShopController::class, 'wechatPay']);
Route::any('/shop/order/callback', [ShopController::class, 'payCallback']);
Route::get('/shop/order/status', [ShopController::class, 'getOrderStatus']);
Route::get('/shop/order/list', [ShopController::class, 'getOrderList']);
Route::get('/shop/order/detail', [ShopController::class, 'getOrderDetail']);
Route::get('/shop/cart/list', [ShopController::class, 'getCart']);
Route::post('/shop/cart/add', [ShopController::class, 'addToCart']);
Route::post('/shop/cart/edit', [ShopController::class, 'editCart']);
Route::post('/shop/cart/delete', [ShopController::class, 'deleteCart']);

Route::get('/shop/test', [ShopController::class, 'test']);
